<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Categories extends CI_Controller {
 
    function __construct()
    {
        parent::__construct();
 
        /* Standard Libraries */
        $this->load->database();
        $this->load->helper('url');

        /* ------------------ */    
 
        $this->load->library('grocery_CRUD');
 
    }
 
    public function index()
    {
 
    }
 
    public function admin()
    {
        $crud = new grocery_CRUD();
 
        $crud->set_table('categories');
		$crud->required_fields('name');
        $output = $crud->render();
 
        $this->_example_output($output);                
    }
 
    function _example_output($output = null)
 
    {
        $this->load->view('admin/admin.php',$output);    
    }    
}